/**
 * 
 */
package mdb.com.vn.model;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * @author tu.dod
 * 
 */
@Entity
@Table(name = "IFTB_CASA")
@NamedQueries({
		@NamedQuery(name = "Casa.findByPersionalType", query = "SELECT c FROM Casa c WHERE c.customerType = :customerType"),
		@NamedQuery(name = "Casa.findByCorporateType", query = "SELECT c FROM Casa c WHERE c.customerType = :customerType"),
		@NamedQuery(name = "Casa.findByCode", query = "SELECT c FROM Casa c WHERE c.accountLocked = :accountLocked"),
		@NamedQuery(name = "Casa.getAllCasas", query = "SELECT c FROM Casa c"),
		@NamedQuery(name = "Casa.countThanksCard", query = "SELECT sum(c.checkGetThankSC) FROM Casa c"),
		@NamedQuery(name = "Casa.sumAmount", query = "SELECT sum(c.wbBalances) FROM Casa c"),
		@NamedQuery(name = "Casa.findByCustomerRef", query = "SELECT c FROM Casa c WHERE c.customerId = :customerId")})
public class Casa extends BasePojo implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	@Id
	@GeneratedValue(strategy = GenerationType.AUTO, generator = "GSEQ_CASA")
	@SequenceGenerator(name = "GSEQ_CASA", sequenceName = "SEQ_CASA")
	private long id;

	@Column(name = "ACCOUNT_LOCKED")
	private String accountLocked;

	@Column(name = "ADDRESS")
	private String address;

	@Column(name = "AMOUNT_LOCKED")
	private BigDecimal amountLocked;

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "DATE_LOCKED")
	private Date dateLocked;

	@Column(name = "INTEREST_RATE")
	private double interestRate;


	@Column(name = "TERM_LOCKED")
	private int termLocked;

	@Column(name = "WB_BALANCES")
	private double wbBalances;

	@Column(name = "LEGAL_ID")
	private String legalId;

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "LEGAL_ISS_DATE")
	private Date legalIssDate;
	
	@Column(name = "LEGAL_ISS_PLACE")
	private String legalIssPlace;
	
	@Column(name = "CATEGORY")
	private String category;
	
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "END_DATE_LOCKED")
	private Date endDateLocked;
	
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "OPENING_DATE")
	private Date openingDate;

	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}

	public String getAccountLocked() {
		return accountLocked;
	}

	public void setAccountLocked(String accountLocked) {
		this.accountLocked = accountLocked;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public BigDecimal getAmountLocked() {
		return amountLocked;
	}

	public void setAmountLocked(BigDecimal amountLocked) {
		this.amountLocked = amountLocked;
	}

	public Date getDateLocked() {
		return dateLocked;
	}

	public void setDateLocked(Date dateLocked) {
		this.dateLocked = dateLocked;
	}

	public double getInterestRate() {
		return interestRate;
	}

	public void setInterestRate(double interestRate) {
		this.interestRate = interestRate;
	}

	public int getTermLocked() {
		return termLocked;
	}

	public void setTermLocked(int termLocked) {
		this.termLocked = termLocked;
	}

	public double getWbBalances() {
		return wbBalances;
	}

	public void setWbBalances(double wbBalances) {
		this.wbBalances = wbBalances;
	}

	public String getLegalId() {
		return legalId;
	}

	public void setLegalId(String legalId) {
		this.legalId = legalId;
	}

	public Date getLegalIssDate() {
		return legalIssDate;
	}

	public void setLegalIssDate(Date legalIssDate) {
		this.legalIssDate = legalIssDate;
	}

	public String getLegalIssPlace() {
		return legalIssPlace;
	}

	public void setLegalIssPlace(String legalIssPlace) {
		this.legalIssPlace = legalIssPlace;
	}

	public Date getEndDateLocked() {
		return endDateLocked;
	}

	public void setEndDateLocked(Date endDateLocked) {
		this.endDateLocked = endDateLocked;
	}

	public String getCategory() {
		return category;
	}

	public void setCategory(String category) {
		this.category = category;
	}

	public Date getOpeningDate() {
		return openingDate;
	}

	public void setOpeningDate(Date openingDate) {
		this.openingDate = openingDate;
	}
	
	
	
	
	
}
